﻿namespace HCMS.Web.Manage.Models
{
    #region 网站前端监控 - 异常日志 参数模型
    /// <summary>
    /// 网站前端监控 - 异常日志 参数模型
    /// </summary>
    public class FrontEndErrorLogsModel
    {
        /// <summary>
        /// 应用 Id
        /// </summary>
        public int AppId { get; set; }

        /// <summary>
        /// 用户 唯一标识
        /// </summary>
        public string Uid { get; set; } = string.Empty;

        /// <summary>
        /// 页面链接
        /// </summary>
        public string Url { get; set; } = string.Empty;

        /// <summary>
        /// 客户端 时间
        /// </summary>
        public DateTime ClientTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 客户端 系统
        /// </summary>
        public string ClientSystem { get; set; } = string.Empty;

        /// <summary>
        /// 用户 代理信息
        /// </summary>
        public string UA { get; set; } = string.Empty;

        /// <summary>
        /// 网络类型
        /// </summary>
        public string NetWorkType { get; set; } = string.Empty;

        /// <summary>
        /// 具体 异常信息
        /// </summary>
        public FrontEndErrorLogs_ErrorDataModel Data { get; set; } = new FrontEndErrorLogs_ErrorDataModel();

        /// <summary>
        /// Cookie 列表
        /// </summary>
        public List<FrontEndErrorLogs_CookieModel> CookieInfo { get; set; } = new List<FrontEndErrorLogs_CookieModel>();
    }

    /// <summary>
    /// 网站前端监控 - Cookie 模型
    /// </summary>
    /// <remarks>
    /// 异常监控
    /// </remarks>
    public class FrontEndErrorLogs_CookieModel
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; } = string.Empty;
    }

    /// <summary>
    /// 网站前端监控 - 异常信息 模型
    /// </summary>
    /// <remarks>
    /// 异常监控
    /// </remarks>
    public class FrontEndErrorLogs_ErrorDataModel
    {
        /// <summary>
        /// 异常信息
        /// </summary>
        public string ErrorMessage { get; set; } = string.Empty;

        /// <summary>
        /// 异常文件路径
        /// </summary>
        public string ScriptUrl { get; set; } = string.Empty;

        /// <summary>
        /// 异常 行号
        /// </summary>
        public int LineNo { get; set; }

        /// <summary>
        /// 异常 列号
        /// </summary>
        public int ColumnNo { get; set; }

        /// <summary>
        /// 异常堆栈信息
        /// </summary>
        public string Stack { get; set; } = string.Empty;
    }
    #endregion
}